Conversation
87cdb84 to
6ab472d
Compare
6ab472d to
6adfc3f
Compare
node/router/router.go
Outdated
| } | ||
|
|
||
| func NewRouter(config *nodeconfig.RouterNodeConfig, logger types.Logger, signer identity.SignerSerializer, configUpdateProposer policy.ConfigUpdateProposer, configRulesVerifier verify.OrdererRules) *Router { | ||
| func NewRouter(config *nodeconfig.RouterNodeConfig, configuration *config.Configuration, logger types.Logger, signer identity.SignerSerializer, configUpdateProposer policy.ConfigUpdateProposer, configRulesVerifier verify.OrdererRules) *Router { |
There was a problem hiding this comment.
This is redundant, no? the RouterNodeConfig is extracted from configuration *config.Configuration, right?
It seems we can move the
routerConf := conf.ExtractRouterConfig(lastConfigBlock)
into the NewRouter, maybe adding an error there for returning an error and panic in the launch?
Seems like this can be done to all server roles?
I also like the way the router starts the service on the router instance instead of doing it in the launch like the batcher, for example.
There was a problem hiding this comment.
yes, the RouterNodeConfig object is redundant. for now we need both to apply the new config update.
I think that it is better to remove the dependency on the RouterNodeConfig, since it requires some refactoring.
node/router/config_submitter.go
Outdated
| configRulesVerifier verify.OrdererRules | ||
| } | ||
|
|
||
| func CreateConfigSubmitter(conf *nodeconfig.RouterNodeConfig, logger types.Logger, verifier *requestfilter.RulesVerifier, signer identity.SignerSerializer, configUpdateProposer policy.ConfigUpdateProposer, configRulesVerifier verify.OrdererRules) *configSubmitter { |
There was a problem hiding this comment.
It seems Create* calls New* and that is it; why not just change the New* ?
New* is now only use in tests, so you can probably change the test to take Create* or the modified New*, right?
This is confusing...
There was a problem hiding this comment.
removed the create
Signed-off-by: Dor.Katzelnick <Dor.Katzelnick@ibm.com>
6adfc3f to
569d0c9
Compare
refactor in router, prepare for dynamic reconfig